package com.b2c.product.controller.admin;

import com.b2c.product.pojo.entity.SpecParam;
import com.b2c.product.service.SpecGroupService;
import com.b2c.product.service.SpecParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

@RestController("adminSpecParamController")
@RequestMapping("/admin/spp")
public class SpecParamController {
    @Autowired
    private SpecParamService specParamService;
    /**
     * 通过品类id获取参数
     * @return
     */
    @GetMapping("{branchId}")
    public Result getParamByBranchId(@PathVariable Integer branchId) {
        return specParamService.getBranchById(branchId);
    }
}
